package gazzera.utils;


public class UserFileID implements FileID
{
    private String userHash;
    private String filePath;
    private long timeStamp;
    private long size;
    
    
 
    public UserFileID(String userHash, String filePath, long timeStamp, long size) {
		super();
		this.userHash = userHash;
		this.filePath = filePath;
		this.timeStamp = timeStamp;
		this.size = size;
	}
	public String getUserHash()
    {
        return userHash;
    }
    public String getFilePath()
    {
        return filePath;
    }
    
    public long getTimeStamp() {
		return timeStamp;
	}
	public long getSize() {
		return size;
	}
	@Override
	public boolean equals(Object obj)
	{
		if(obj instanceof UserFileID)
		{
		    UserFileID x = (UserFileID) obj;

		    return this.userHash.equals(x.userHash) 
					    && this.filePath.equals(x.filePath) 
					    && (this.size == x.size) 
					    && (this.timeStamp == x.timeStamp);
		}
		return false;
	}
	@Override
	public String toString() {
		
		return "Unhashed file "+hashCode();
	}
    
	
	
}
